import Vue from 'vue'
import VueRouter from 'vue-router'
import Login from "../views/Login";
import ChatDashboard from "../views/ChatDashboard";

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect: '/login'
  },
  {
    path: '/login',
    component: Login
  },
  {
    path: '/chat',
    name: 'chat',
    component: ChatDashboard,
  }
]

const router = new VueRouter({
  routes,
  mode:'history',
  base: process.env.BASE_URL,
})

export default router
